<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="css/common.css" type="text/css" />
<link href="css/swfupload.css" rel="stylesheet" type="text/css" />
<title>添加石材</title>
<script type="text/javascript" src="js/swfupload.js"></script>
<script type="text/javascript" src="js/swfupload.queue.js"></script>
<script type="text/javascript" src="js/fileprogress.js"></script>
<script type="text/javascript" src="js/handlers.js"></script>
<script type="text/javascript">
		var flag=0;//0还未上传 1正在上传 2上传成功 -1上传失败
		var upload1, upload2;

		window.onload = function() {
			upload1 = new SWFUpload({

				//提交路径
				upload_url: "uploadImage.action",
				//向后台传递额外的参数
				//post_params: {"name" : "kaobian"},
				//上传文件的名称
				file_post_name: "file",
				
				// 下面自己按照字面意思理解
				file_size_limit : "1024",	// 100MB
				file_types : "*.jpg;*.png;*.gif",
				file_types_description : "All Files",
				file_upload_limit : "6",
				file_queue_limit : "6",

				// 事件处理
				file_dialog_start_handler : fileDialogStart,
				file_queued_handler : fileQueued,
				file_queue_error_handler : fileQueueError,
				file_dialog_complete_handler : fileDialogComplete,
				upload_start_handler : uploadStart,
				upload_progress_handler : uploadProgress,
				upload_error_handler : uploadError,
				upload_success_handler : uploadSuccess,
				upload_complete_handler : uploadComplete,

				// 按钮的处理
				button_image_url : "images/XPButtonUploadText_61x22.png",
				button_placeholder_id : "buttonUpload",
				button_width: 61,
				button_height: 22,
				
				// Flash Settings
				flash_url : "js/swfupload.swf",
				

				custom_settings : {
					progressTarget : "fsUploadProgress1",
					cancelButtonId : "btnCancel1"
				},
				
				// Debug Settings
				debug: false
			});
	     }
	function submitForm(){
		
		document.detailForm.submit();
	}
	</script>
	
</head>

<body>
<div id="man_zone">
  <form action = "addStone.action" name=detailForm method="post">
  <table width="99%" border="0" align="center"  cellpadding="3" cellspacing="1" class="table_style">
    <tr>
      <td width="18%" class="left_title_1"><span class="left-title">中文名：</span></td>
      <td width="82%"><input type="text" name="chineseName" size="30"/></td>
    </tr>
    <tr>
      <td class="left_title_2">英文名：</td>
      <td><input type="text" name="englishName" size="30"/></td>
    </tr>
    <tr>
      <td class="left_title_1">原产地:</td>
      <td><input type="text" name="sourceland" size="30"/></td>
    </tr>
    <tr>
      <td class="left_title_2">种类:</td>
      <td><input type="text" name="category" size="30"/></td>
    </tr>
     <tr>
      <td class="left_title_1">抗压强度（C.S）:</td>
      <td><input type="text" name="stoneCS" size="30"/></td>
    </tr>
     <tr>
      <td class="left_title_2">抗折强度（M.R）:</td>
      <td><input type="text" name="stoneMR" size="30"/></td>
    </tr>
     <tr>
      <td class="left_title_1">肖氏硬度（S.H）:</td>
      <td><input type="text" name="stoneSH" size="30"/></td>
    </tr>
     <tr>
      <td class="left_title_2">岩石密度（B.D）:</td>
      <td><input type="text" name="stoneBD" size="30"/></td>
    </tr>
     <tr>
      <td class="left_title_1">吸水率（W.A）:</td>
      <td><input type="text" name="stoneWA" size="30"/></td>
    </tr>
    <tr>
      <td class="left_title_2">纹理：</td>
      <td><input type="text" name="venation" size="30"/></td>
    </tr>
    <tr>
      <td class="left_title_1">颜色:</td>
      <td><input type="text" name="color" size="30"/></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td class="left_title_2">价格上限:</td>
      <td><input type="text" name="minprice" size="30"/></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td class="left_title_1">价格下限:</td>
      <td><input type="text" name="maxprice" size="30"/></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td class="left_title_2">档次:</td>
      <td><input type="text" name="level" size="30"/></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td class="left_title_1">适用于:</td>
      <td><input type="text" name="purpose" size="30"/></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td class="left_title_1">成功案例:</td>
      <td><input type="text" name="successfulCase" size="30"/></td>
    </tr>
  </table>
   </form>
   <table width="99%" border="0" align="center"  cellpadding="3" cellspacing="1" class="table_style">
    <tr bgcolor="#FFFFFF">
      <td class="left_title_2" width="18%" >选择图片</td>
      <td>
		
	<div id="content" class="swfupload">
    <form action="upload.action" method="post" name="thisform" enctype="multipart/form-data">

		<div>
			<div class="fieldset flash" id="fsUploadProgress1">
				<span class="legend">文件上传</span>
			</div>
			<div style="padding-left:5px;">
				<span id="buttonUpload"></span>
				<input id="btnCancel1" type="button" value="Cancel Uploads" onclick="cancelQueue(upload1);" disabled="disabled" style="margin-left: 2px; height: 22px; font-size: 8pt;" />
				<br />
			</div>
		</div>

    </form>
    </div>
		
	</td>
    </tr>
    <tr>
    	<td></td>
    	<td><input type="button" value="保存并继续" onclick="submitForm()" /></td>
    </tr>
  </table>

 
</div>
</body>
</html>
